package STUDENT.TRANNGUYENQUAN.OOPs.OBJECT_AND_CLASSES.Bai5;

public class RegisControllers {
	public boolean CheckRegistration(UserInfo user) {
		Models model = new Models();
		if (user.getAge() >= 19) {
			if (model.Sex(user) == "male" && user.getAge() >= 22) {
				if (model.Status(user) == "single" || model.Status(user) == "divorced") {
					return true;
				} else {
					return false;
				}
			} else if (model.Sex(user) == "female") {
				if (model.Status(user) == "single" || model.Status(user) == "divorced") {
					return true;
				} else {
					return false;
				}

			} else {
				return false;
			}
		} else {
			return false;
		}
	}
}
